// 0. 导入axios实例对象用于发送网络请求
import request from '@/utils/request'

import store from '@/store'

// 1. 调获取验证码的接口的函数
export const sendSms = mobile => {
  return request({
    method: 'GET',
    url: `/v1_0/sms/codes/${mobile}`
  })
}

export const login = data => request({
      method: 'POST',
      url: '/v1_0/authorizations',
      data
    })

export const getUserInfo=()=>request({
  method: 'GET',
  url: '/v1_0/user',
  // headers: {
  //   Authorization: `Bearer ${store.state.user.token}`
  // }
})